<?php
/**
 * Created by PhpStorm.
 * User: jz
 * Date: 16/7/13
 * Time: 下午9:07
 */
require_once ('bookmark_fns.php');
session_start();

$del_urls = $_POST['del_me'];

do_html_header('删除标签');
check_valid_user();
if (!filled_out($_POST)){
    echo '您还没有选择要删除的标签';
    display_user_menu();
    do_html_footer();
    exit;
}
if (count($del_urls) > 0) {
    foreach ($del_urls as $key => $url) {
        $ret = del_bm($_SESSION['valid_user'], $url);
        if ($ret){
            echo htmlspecialchars($url) . "删除成功<br>";
        }else {
            echo htmlspecialchars($url) . "删除失败<br>";
        }
    }
}else{
    echo "没有选择标签";
}
$urls = get_user_urls($_SESSION['valid_user']);
display_user_urls($urls);
display_user_menu();
do_html_footer();

